#ifndef __baker_Prerequire_h__
#define __baker_Prerequire_h__

extern "C"
{
    #include <glib.h>
    #include <math.h>
}

namespace baker
{
    typedef gfloat real;

    static const real EPSILON = 1e-5;


    /** A global delete util function, mainly used in foreach
    */
    template< typename T >
    static inline void safeDelete( T * & ptr )
    {
        if( NULL != ptr )
        {
            delete ptr;
            ptr = NULL;
        }
    }

    /** A global compare-less function; making use of operator &lt;
        (i.e. lhs < rhs )
    */
    template< typename T >
    static inline bool less ( const T & lhs
                            , const T & rhs
                            )
    {
        return lhs < rhs;
    }
}

#endif  // __baker_Prerequire_h__
